﻿#include('/header.html', {title : '新增试卷'})
<body class="es-main-default es-nav-default ">


<div class="es-wrap">
  <div id="content-container" class="container">
    <div class="es-section course-manage-header clearfix">
      <a href="/course/3">
        <img class="picture" src="/static/img/courseset.png"/> <!-- courseSet.largePicture -->
      </a>
      <h1 class="title">
        <a class="link-dark" href="/course/3">test</a>
        <span class="label label-warning ">未发布</span>
      </h1>

      <div class="teachers">
        教师：
        <a href="/user/1">admin</a>
      </div>

      <div class="toolbar hidden-xs">


        <div class="btn-group">
          <a class="btn btn-default btn-sm" target="_blank" href="/course/3?previewAs=guest">预览</a>
        </div>
        <div class="btn-group">
          <button class="btn btn-primary btn-sm course-publish-btn" data-url="/course_set/3/manage/publish">发布课程
          </button>
        </div>
      </div>
    </div>

    <div class="row">
      <div class="col-md-3">

        <div class="sidenav locked js-sidenav" data-course-length="1">
          #include('list.html', {testpaper : 'active'})
        </div>


      </div>
      <div class="col-md-9">

        <div class="panel panel-default panel-col test-creator">
          <div class="panel-heading clearfix">创建试卷</div>

          <div class="panel-body">

            <ol class="breadcrumb">
              <li><a href="/course_set/3/manage/testpaper">试卷管理</a></li>
              <li class="active">创建试卷</li>

            </ol>

            <form id="testpaper-form" class="form-horizontal" method="post" data-auto-submit="false"
                  data-have-base-fields="true" data-have-build-fields="true" data-course-id="3">


              <div id="colorpicker">
                <div class="sliders" id="red"></div>
                <div class="sliders" id="green"></div>
                <div class="sliders" id="blue"></div>
                <div class="result"></div>
              </div>

              <div class="form-group">
                <div class="col-md-2 control-label"><label for="name-field" class="control-label-required">试卷名称</label>
                </div>
                <div class="col-md-8 controls">
                  <input class="form-control" value="" name="name" id="name-field"/>
                </div>
              </div>

              <div class="form-group">
                <div class="col-md-2 control-label"><label for="description-field">试卷说明</label></div>
                <div class="col-md-8 controls">
                  <textarea class="form-control" id="description-field" name="description"
                            data-image-upload-url="/editor/upload?token=MXxjb3Vyc2V8aW1hZ2V8MTUzMjU1OTAxNHw5ZTMwNmY3YTc3MDM0NjZiYWYwMjExY2Y0NDA3OTE0YQ"></textarea>
                </div>
              </div>
              <div class="form-group">
                <div class="col-md-2 control-label">
                  <label for="testpaper-percentage-field">生成方式</label>
                </div>
                <div class="col-md-8 controls radios">
                  <label><input type="radio" name="mode" value="rand" checked="checked"> 随机生成</label><label><input
                    type="radio" name="mode" value="difficulty"> 按难易程度</label>
                </div>
              </div>

              <div class="form-group hidden" id="difficulty-form-group">
                <div class="col-md-2 control-label">
                  <label for="testpaper-percentage-field">试卷难度</label>
                </div>
                <div class="col-md-8 controls mtm">
                  <div class="mbm" id="difficulty-percentage-slider"></div>
                  <p class="help-block mbm">
                    <span class="js-simple-percentage-text"></span>
                    <span class="js-normal-percentage-text"></span>
                    <span class="js-difficulty-percentage-text"></span>
                  </p>
                  <span class="color-warning">如果某个难度的题目数不够，将会随机选择题目来补充。</span>
                </div>
              </div>

              <div class="form-group">
                <div class="col-md-2 control-label"><label for="testpaper-range-field">出题范围</label></div>
                <div class="col-md-8 controls">
                  <select class="form-control width-150" name="ranges[courseId]"
                          data-url="/course_set/3/manage/show/tasks"
                          data-check-num-url="/course_set/3/manage/question/check/num">
                    <option value="0" selected>按课程</option>
                    <option value="3">默认教学计划</option>
                  </select>
                  <select class="form-control width-150" style="display:none;" name="ranges[lessonId]"
                          data-check-num-url="/course_set/3/manage/question/check/num">
                    <option value="0" selected>请选择</option>
                  </select>
                </div>
              </div>

              <div class="form-group">
                <style>.testpaper-question-option-item {
                  margin-left: -12px;
                  margin-bottom: 5px;
                  list-style: none;
                }</style>
                <div class="col-md-2 control-label"><label class="control-label-required">题目设置</label></div>
                <ul class="col-md-10 controls" id="testpaper-question-options">
                  <li class="testpaper-question-option-item">
                    <button type="button" class="btn btn-link question-type-sort-handler"><span
                        class="glyphicon glyphicon-move"></span></button>
                    <span style="min-width:85px;display:inline-block;_display:inline;">单选题</span>
                    <span class="mlm">题目数量:</span>
                    <input type="text" class="form-control width-input width-input-mini item-number"
                           name="counts[single_choice]" data-role="count" value="0" disabled/>/
                    <span class="text-info question-num" role="questionNum" type="single_choice"
                          style="display:inline-block;min-width: 45px;">0</span>

                    <span class="mlm">题目分值:</span>
                    <input type="text" class="form-control width-input width-input-mini item-score"
                           name="scores[single_choice]" value="2" data-role="score"/>

                  </li>
                  <li class="testpaper-question-option-item">
                    <button type="button" class="btn btn-link question-type-sort-handler"><span
                        class="glyphicon glyphicon-move"></span></button>
                    <span style="min-width:85px;display:inline-block;_display:inline;">多选题</span>
                    <span class="mlm">题目数量:</span>
                    <input type="text" class="form-control width-input width-input-mini item-number"
                           name="counts[choice]" data-role="count" value="0" disabled/>/
                    <span class="text-info question-num" role="questionNum" type="choice"
                          style="display:inline-block;min-width: 45px;">0</span>

                    <span class="mlm">题目分值:</span>
                    <input type="text" class="form-control width-input width-input-mini item-score"
                           name="scores[choice]" value="2" data-role="score"/>

                    <span class="mlm">漏选分值:</span>
                    <input type="text" class="form-control width-input width-input-mini item-miss-score"
                           name="missScores[choice]" value="0" data-role="missScore"/>
                  </li>
                  <li class="testpaper-question-option-item">
                    <button type="button" class="btn btn-link question-type-sort-handler"><span
                        class="glyphicon glyphicon-move"></span></button>
                    <span style="min-width:85px;display:inline-block;_display:inline;">问答题</span>
                    <span class="mlm">题目数量:</span>
                    <input type="text" class="form-control width-input width-input-mini item-number"
                           name="counts[essay]" data-role="count" value="0" disabled/>/
                    <span class="text-info question-num" role="questionNum" type="essay"
                          style="display:inline-block;min-width: 45px;">0</span>

                    <span class="mlm">题目分值:</span>
                    <input type="text" class="form-control width-input width-input-mini item-score" name="scores[essay]"
                           value="2" data-role="score"/>

                  </li>
                  <li class="testpaper-question-option-item">
                    <button type="button" class="btn btn-link question-type-sort-handler"><span
                        class="glyphicon glyphicon-move"></span></button>
                    <span style="min-width:85px;display:inline-block;_display:inline;">不定项选择题</span>
                    <span class="mlm">题目数量:</span>
                    <input type="text" class="form-control width-input width-input-mini item-number"
                           name="counts[uncertain_choice]" data-role="count" value="0" disabled/>/
                    <span class="text-info question-num" role="questionNum" type="uncertain_choice"
                          style="display:inline-block;min-width: 45px;">0</span>

                    <span class="mlm">题目分值:</span>
                    <input type="text" class="form-control width-input width-input-mini item-score"
                           name="scores[uncertain_choice]" value="2" data-role="score"/>

                    <span class="mlm">漏选分值:</span>
                    <input type="text" class="form-control width-input width-input-mini item-miss-score"
                           name="missScores[uncertain_choice]" value="0" data-role="missScore"/>
                  </li>
                  <li class="testpaper-question-option-item">
                    <button type="button" class="btn btn-link question-type-sort-handler"><span
                        class="glyphicon glyphicon-move"></span></button>
                    <span style="min-width:85px;display:inline-block;_display:inline;">判断题</span>
                    <span class="mlm">题目数量:</span>
                    <input type="text" class="form-control width-input width-input-mini item-number"
                           name="counts[determine]" data-role="count" value="0" disabled/>/
                    <span class="text-info question-num" role="questionNum" type="determine"
                          style="display:inline-block;min-width: 45px;">0</span>

                    <span class="mlm">题目分值:</span>
                    <input type="text" class="form-control width-input width-input-mini item-score"
                           name="scores[determine]" value="2" data-role="score"/>

                  </li>
                  <li class="testpaper-question-option-item">
                    <button type="button" class="btn btn-link question-type-sort-handler"><span
                        class="glyphicon glyphicon-move"></span></button>
                    <span style="min-width:85px;display:inline-block;_display:inline;">填空题</span>
                    <span class="mlm">题目数量:</span>
                    <input type="text" class="form-control width-input width-input-mini item-number" name="counts[fill]"
                           data-role="count" value="0" disabled/>/
                    <span class="text-info question-num" role="questionNum" type="fill"
                          style="display:inline-block;min-width: 45px;">0</span>

                    <span class="mlm">题目分值:</span>
                    <input type="text" class="form-control width-input width-input-mini item-score" name="scores[fill]"
                           value="2" data-role="score"/>

                  </li>
                  <li class="testpaper-question-option-item">
                    <button type="button" class="btn btn-link question-type-sort-handler"><span
                        class="glyphicon glyphicon-move"></span></button>
                    <span style="min-width:85px;display:inline-block;_display:inline;">材料题</span>
                    <span class="mlm">题目数量:</span>
                    <input type="text" class="form-control width-input width-input-mini item-number"
                           name="counts[material]" data-role="count" value="0" disabled/>/
                    <span class="text-info question-num" role="questionNum" type="material"
                          style="display:inline-block;min-width: 45px;">0</span>

                    <span class="mlm">题目分值:</span>
                    <input type="text" class="form-control width-input width-input-mini item-score"
                           name="scores[material]" value="2" data-role="score"/>

                  </li>
                  <input type="hidden" name="questioncount">
                  <span class="help-block color-danger js-build-check"></span>
                </ul>

              </div>

              <input type="hidden" name="percentages[simple]">
              <input type="hidden" name="percentages[normal]">
              <input type="hidden" name="percentages[difficulty]">

              <div class="form-group mbm">
                <div class="col-md-8 col-md-offset-2 controls">
                  <button id="testpaper-create-btn" data-loading-text="正在提交..." type="button" class="btn btn-primary"
                          data-role="submit" data-check-url="/course_set/3/manage/testpaper/build/check">保存，下一步
                  </button>
                  <a href="/course_set/3/manage/testpaper" class="btn btn-link  ">返回</a>
                </div>
              </div>

              <input type="hidden" name="_csrf_token" value="drI_Cs7ZMLOPRYjezpiAsiUAySC8Nr0gscinNFQxAXo">

            </form>

          </div>
        </div>
      </div>
    </div>
  </div>


  <footer class="es-footer">
    <div class="copyright">
      <div class="container">
        Powered by <a href="http://www.edusoho.com/" target="_blank">EduSoho v8.2.38</a>
        ©2014-2018 <a class="mlm" href="http://www.howzhi.com/" target="_blank">好知网</a>
        <a class="mlm" href="/archive/course">课程存档</a>
        <div class="mts">
        </div>
      </div>
    </div>
  </footer>


</div>


<div id="login-modal" class="modal" data-url="/login/ajax"></div>
<div id="modal" class="modal"></div>
<div id="attachment-modal" class="modal"></div>
#include('/footer.html')